import App from './App'

// #ifdef VUE3
import {createSSRApp} from 'vue'
import {Divider, Empty, Calendar, Button, Step, Steps,Form, Field, CellGroup,Toast} from 'vant'
import 'vant/lib/index.css'

export function createApp() {
  const app = createSSRApp(App)
  const components = [Toast,Button, Calendar, Divider, Empty, Step, Steps,Form, Field, CellGroup]
  components.forEach(component => {
    app.component(component.name, component)
  })

  return {
    app
  }
}

// #endif

// #ifndef VUE3
// Vue 2 的逻辑
// import Vue from 'vue'
// import './uni.promisify.adaptor'
// import { Button } from 'vant'
// import 'vant/lib/index.css'
//
// Vue.config.productionTip = false
// Vue.component(Button.name, Button)
//
// App.mpType = 'app'
// const app = new Vue({
//   ...App
// })
// app.$mount()
// #endif